#!/usr/bin/env python
import rospy
from custom_msg_pkg.msg import CustomMessage

def callback(msg):
    rospy.loginfo("Received: Float = %f, String = %s", msg.data_float, msg.data_string)

def subscriber():
    rospy.init_node('custom_message_subscriber', anonymous=True)
    rospy.Subscriber('custom_topic', CustomMessage, callback)
    rospy.spin()

if __name__ == '__main__':
    subscriber()

